package cn.leaf.state;

public class ConfirmedState implements OrderState {
    @Override
    public void confirm(Order order) {
        System.out.println("订单已确认，不能重复确认！");
    }

    @Override
    public void cancel(Order order) {
        order.setState(new UnconfirmedState());
        System.out.println("订单已取消！");
    }

    @Override
    public void ship(Order order) {
        order.setState(new ShippedState());
        System.out.println("订单已发货！");
    }
}